Skip to content

Logical operators #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Mar 27, 2021
Merged

Logical operators #100

merged 24 commits into from
Mar 27, 2021

Conversation

mahdiHash
Copy link
Contributor

Please read the description of article.md and solution.md of task 8 "if question".
Please review and comment / commit if anything is wrong

Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
I translated line 7 as it was but in my opinion to keep it readable it would be better this way:
نتیجه 0 || 1- برابر با 1- است، truthy
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
Please review and comment / commit if anything is wrong
I translated line 7 as it was but in my opinion to keep it readable it would be better this way:
نتیجه 0 || 1- برابر با 1- است، truthy
Please review and comment / commit if anything is wrong
Translation is not done yet
I translated line 100 as it was but I think it would be better this way:
این باعث چند استفاده جالب نسبت به یک "OR خالص و کلاسیک که تنها boolean قبول می کند" می شود.
Please let me know what you think
Translation is not done yet
I translated line 100 as it was but I think it would be better this way:
این باعث چند استفاده جالب نسبت به یک "OR خالص و کلاسیک که تنها boolean قبول می کند" می شود.
Please let me know what you think and review and comment / commit if anything is wrong
@@ -1,4 +1,4 @@
The answer is `2`, that's the first truthy value.
جواب 2 است، آن(2) اولین مقدار truthy است.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 2 should be between backquotes:
جواب `2` است
and there is no need to mention it again:
آن(2)


## || (OR)
## || (OR یا)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for Persian translation.

Comment on lines 24 to 27
alert( true || true ); // true درست
alert( false || true ); // true درست
alert( true || false ); // true درست
alert( false || false ); // false اشتباه
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use either true or درست, not both of them.
Use either false or اشتباه, not both of them.

alert( Boolean(null) ); // false
```

The precedence of NOT `!` is the highest of all logical operators, so it always executes first, before `&&` or `||`.
اولویت NOT `!` بالاترین اولویت بین عملگر های منطقی دارد، بنابراین همیشه اول اجرا می شود، قبل از `&&` یا `||`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence readability could be better:
عملگر NOT `!` بالاترین اولویت را بین عملگرهای منطقی دارد،


```js run
let hour = 12;
let isWeekend = true;

if (hour < 10 || hour > 18 || isWeekend) {
alert( 'The office is closed.' ); // it is the weekend
alert( 'The office is closed.' ); // آخر هفته است
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The office is closed. should also be translated.

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

All the mentioned problems are fixed.
@mahdiHash
Copy link
Contributor Author

Thank you for your review, @mahdyar

@mahdiHash
Copy link
Contributor Author

/done

Copy link
Member

@mahdyar mahdyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @mahdiHashemi14!

@mahdyar mahdyar merged commit a408f10 into javascript-tutorial:master Mar 27, 2021
@javascript-translate-bot

Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants